//
//  UIImage+Bundle.m
//  DemoImages
//
//  Created by EwenMac on 2018/6/14.
//

#import "UIImage+Bundle.h"
#import "TestObject.h"
@implementation UIImage (Bundle)

+ (UIImage *)bundleImageWithName:(NSString *)imageName {
    
    NSURL *url = [[NSBundle bundleForClass:[TestObject class]] URLForResource:@"DemoImages" withExtension:@"bundle"];
    NSBundle *bundle = [NSBundle bundleWithURL:url];
    UIImage *image = [UIImage imageNamed:imageName inBundle:bundle compatibleWithTraitCollection:nil];
    return image;
}


@end
